package com.tjhzzx.danfossNiagaraCore.model.set;


import com.tjhzzx.danfossNiagaraCore.enums.BEnergyCategoryType;
import com.tjhzzx.danfossNiagaraCore.model.menu.BTreeMenuGroup;

import javax.baja.sys.Flags;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;

/**
 * @author Luc
 * @version 1.0
 * @date 2022-09-07 10:50
 */
public class BEnergyCategory extends BTreeMenuGroup {

    public BEnergyCategory() {
        this.setFlags(this.getSlot("price"), Flags.READONLY);
    }

    public static final Property energyCategoryType = newProperty(0, BEnergyCategoryType.DEFAULT, null);

    public BEnergyCategoryType getEnergyCategoryType() {
        return (BEnergyCategoryType) get(energyCategoryType);
    }

    public void setEnergyCategoryType(BEnergyCategoryType v) {
        set(energyCategoryType, v, null);
    }

    public static final Property price = newProperty(0, "[{\"s\":0,\"e\":-1,\"c\":1,\"p\":1}]", null);

    public String getPrice() {
        return getString(price);
    }

    public void setPrice(String v) {
        setString(price, v, null);
    }

    public static final Property energyTypeExpose = newProperty(Flags.HIDDEN, BEnergyCategoryType.expose(), null);

    public String getEnergyTypeExpose() {
        return getString(energyTypeExpose);
    }

    public void setEnergyTypeExpose(String v) {
        setString(energyTypeExpose, v, null);
    }

    @Override
    public Type getType() {
        return TYPE;
    }

    public static final Type TYPE = Sys.loadType(BEnergyCategory.class);
}
